home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
wsc4vb24
/
wsc32.bas
< prev
next >
Wrap
BASIC Source File
|
1999-05-27
|
4KB
|
125 lines
'
' WSC32.BAS [2.4]
'
Declare Function SioBaud Lib "WSC32.DLL" (ByVal Port As Long, ByVal BaudCode As Long) As Long
Declare Function SioBrkSig Lib "WSC32.DLL" (ByVal Port As Long, ByVal Cmd As Long) As Long
Declare Function SioCTS Lib "WSC32.DLL" (ByVal Port As Long) As Long
Declare Function SioDCD Lib "WSC32.DLL" (ByVal Port As Long) As Long
Declare Function SioDone Lib "WSC32.DLL" (ByVal Port As Long) As Long
Declare Function SioDSR Lib "WSC32.DLL" (ByVal Port As Long) As Long
Declare Function SioDTR Lib "WSC32.DLL" (ByVal Port As Long, ByVal Char As Long) As Long
Declare Function SioEvent Lib "WSC32.DLL" (ByVal Port As Long, ByVal Mask As Long)
Declare Function SioFlow Lib "WSC32.DLL" (ByVal Port As Long, ByVal Code As Long) As Long
Declare Function SioGetc Lib "WSC32.DLL" (ByVal Port As Long) As Long
Declare Function SioGets Lib "WSC32.DLL" (ByVal Port As Long, ByVal Buffer As String, ByVal StringSize As Long) As Long
Declare Function SioInfo Lib "WSC32.DLL" (ByVal Cmd As Long) As Long
Declare Function SioParms Lib "WSC32.DLL" (ByVal Port As Long, ByVal Code1 As Long, ByVal Code2 As Long, ByVal Code3 As Long) As Long
Declare Function SioPutc Lib "WSC32.DLL" (ByVal Port As Long, ByVal Char As Long) As Long
Declare Function SioPuts Lib "WSC32.DLL" (ByVal Port As Long, ByVal Buffer As String, ByVal Size As Long) As Long
Declare Function SioRead Lib "WSC32.DLL" (ByVal Port As Long, ByVal Reg) As Long
Declare Function SioReset Lib "WSC32.DLL" (ByVal Port As Long, ByVal RxQueSize As Long, ByVal TxQueSize As Long) As Long
Declare Function SioRI Lib "WSC32.DLL" (ByVal Port As Long) As Long
Declare Function SioRTS Lib "WSC32.DLL" (ByVal Port As Long, ByVal Char As Long) As Long
Declare Function SioRxClear Lib "WSC32.DLL" (ByVal Port As Long) As Long
Declare Function SioRxQue Lib "WSC32.DLL" (ByVal Port As Long) As Long
Declare Function SioStatus Lib "WSC32.DLL" (ByVal Port As Long, ByVal Mask As Long) As Long
Declare Function SioTimer Lib "WSC32.DLL" () As Long
Declare Function SioTxClear Lib "WSC32.DLL" (ByVal Port As Long) As Long
Declare Function SioTxQue Lib "WSC32.DLL" (ByVal Port As Long) As Long
Declare Function SioUnGetc Lib "WSC32.DLL" (ByVal Port As Long, ByVal Char As Long) As Long
Declare Function SioWinError Lib "WSC32.DLL" (ByVal Buffer As String, ByVal Size As Long) As Long
Rem COM port codes
Global Const COM1 = 0
Global Const COM2 = 1
Global Const COM3 = 2
Global Const COM4 = 3
Global Const COM5 = 4
Global Const COM6 = 5
Global Const COM7 = 6
Global Const COM8 = 7
Global Const COM9 = 8
Global Const COM10 = 9
Global Const COM11 = 10
Global Const COM12 = 11
Global Const COM13 = 12
Global Const COM14 = 13
Global Const COM15 = 14
Global Const COM16 = 15
Global Const COM17 = 16
Global Const COM18 = 17
Global Const COM19 = 18
Global Const COM20 = 19
Rem Parity Codes
Global Const NoParity = 0
Global Const OddParity = 1
Global Const EvenParity = 2
Global Const MarkParity = 3
Global Const SpaceParity = 4
Rem Stop Bit Codes
Global Const OneStopBit = 0
Global Const One5StopBit = 1
Global Const TwoStopBits = 2
Rem Word Length Codes
Global Const WordLength5 = 5
Global Const WordLength6 = 6
Global Const WordLength7 = 7
Global Const WordLength8 = 8
Rem baud codes
Global Const Baud110 = 0
Global Const Baud300 = 1
Global Const Baud1200 = 2
Global Const Baud2400 = 3
Global Const Baud4800 = 4
Global Const Baud9600 = 5
Global Const Baud19200 = 6
Global Const Baud38400 = 7
Global Const Baud57600 = 8
Global Const Baud115200 = 9
Rem SioGetError Masks
Global Const WSC_RXOVER = &H1
Global Const WSC_OVERRUN = &H2
Global Const WSC_PARITY = &H4
Global Const WSC_FRAME = &H8
Global Const WSC_BREAK = &H10
Global Const WSC_TXFULL = &H100
Rem Command codes
Global Const ASSERT_BREAK = 65
Global Const CANCEL_BREAK = 67
Global Const DETECT_BREAK = 68
Global Const SET_LINE = 83
Global Const CLEAR_LINE = 67
Global Const READ_LINE = 82
Rem Return codes
Global Const IE_BADID = -1
Global Const IE_OPEN = -2
Global Const IE_NOPEN = -3
Global Const IE_MEMORY = -4
Global Const IE_DEFAULT = -5
Global Const IE_HARDWARE = -10
Global Const IE_BYTESIZE = -11
Global Const IE_BAUDRATE = -12
Global Const WSC_NO_DATA = -100
Global Const WSC_RANGE = -101
Global Const WSC_ABORTED = -102
Global Const WSC_WIN32ERR = -103